home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / DiceSource / src / alib / csup / rexx_support / autodoc.asm next >
Encoding:
Assembly Source File  |  1994-02-14  |  4.7 KB  |  163 lines

  1. ******* amiga.lib/CheckRexxMsg ************************************************
  2. *
  3. *   NAME
  4. *    CheckRexxMsg - Check if a RexxMsg is from ARexx
  5. *
  6. *   SYNOPSIS
  7. *    result = CheckRexxMsg(message)
  8. *    D0                    A0
  9. *
  10. *    BOOL CheckRexxMsg(struct RexxMsg *);
  11. *
  12. *   FUNCTION
  13. *    This function checks to make sure that the message is from ARexx
  14. *    directly.  It is required when using the Rexx Variable Interface
  15. *    routines (RVI) that the message be from ARexx.
  16. *
  17. *    While this function is new in the V37 amiga.lib, it is safe to
  18. *    call it in all versions of the operating system.  It is also
  19. *    PURE code, thus usable in resident/pure executables.
  20. *
  21. *   NOTE
  22. *    This is a stub in amiga.lib.  It is only available via amiga.lib.
  23. *    The stub has two labels.  One, _CheckRexxMsg, takes the arguments
  24. *    from the stack.  The other, CheckRexxMsg, takes the arguments in
  25. *    registers.
  26. *
  27. *   EXAMPLE
  28. *    if (CheckRexxMsg(rxmsg))
  29. *    {
  30. *        /* Message is one from ARexx */
  31. *    }
  32. *
  33. *   INPUTS
  34. *    message        A pointer to the RexxMsg in question
  35. *
  36. *   RESULTS
  37. *    result        A boolean - TRUE if message is from ARexx.
  38. *
  39. *   SEE ALSO
  40. *    GetRexxVar(), SetRexxVar()
  41. *
  42. *******************************************************************************
  43.  
  44. ******* amiga.lib/GetRexxVar **************************************************
  45. *
  46. *   NAME
  47. *    GetRexxVar - Gets the value of a variable from a running ARexx program
  48. *
  49. *   SYNOPSIS
  50. *    error = GetRexxVar(message,varname,bufpointer)
  51. *    D0,A1              A0      A1      (C-only)
  52. *
  53. *    LONG GetRexxVar(struct RexxMsg *,char *,char **);
  54. *
  55. *   FUNCTION
  56. *    This function will attempt to extract the value of the symbol
  57. *    varname from the ARexx script that sent the message.  When called
  58. *    from C, a pointer to the extracted value will be placed in the
  59. *    pointer pointed to by bufpointer.  (*bufpointer will be the pointer
  60. *    to the value)
  61. *
  62. *    When called from assembly, the pointer will be returned in A1.
  63. *
  64. *    The value string returned *MUST* *NOT* be modified.
  65. *
  66. *    While this function is new in the V37 amiga.lib, it is safe to
  67. *    call it in all versions of the operating system.  It is also
  68. *    PURE code, thus usable in resident/pure executables.
  69. *
  70. *   NOTE
  71. *    This is a stub in amiga.lib.  It is only available via amiga.lib.
  72. *    The stub has two labels.  One, _GetRexxVar, takes the arguments
  73. *    from the stack.  The other, GetRexxVar, takes the arguments in
  74. *    registers.
  75. *
  76. *    This routine does a CheckRexxMsg() on the message.
  77. *
  78. *   EXAMPLE
  79. *
  80. *    char    *value;
  81. *
  82. *    /* Message is one from ARexx */
  83. *    if (!GetRexxVar(rxmsg,"TheVar",&value))
  84. *    {
  85. *        /* The value was gotten and now is pointed to by value */
  86. *        printf("Value of TheVar is %s\n",value);
  87. *    }
  88. *
  89. *   INPUTS
  90. *    message        A message gotten from an ARexx script
  91. *    varname        The name of the variable to extract
  92. *    bufpointer    (For C only) A pointer to a string pointer.
  93. *
  94. *   RESULTS
  95. *    error        0 for success, otherwise an error code.
  96. *            (Other codes may exists, these are documented)
  97. *            3  == Insufficient Storage
  98. *            9  == String too long
  99. *            10 == invalid message
  100. *
  101. *    A1        (Assembly only)  Pointer to the string.
  102. *
  103. *   SEE ALSO
  104. *    SetRexxVar(), CheckRexxMsg()
  105. *
  106. *******************************************************************************
  107.  
  108. ******* amiga.lib/SetRexxVar **************************************************
  109. *
  110. *   NAME
  111. *    SetRexxVar - Sets the value of a variable of a running ARexx program
  112. *
  113. *   SYNOPSIS
  114. *    error = SetRexxVar(message,varname,value,length)
  115. *    D0                 A0      A1      D0    D1
  116. *
  117. *    LONG SetRexxVar(struct RexxMsg *,char *,char *,ULONG);
  118. *
  119. *   FUNCTION
  120. *    This function will attempt to the the value of the symbol
  121. *    varname in the ARexx script that sent the message.
  122. *
  123. *    While this function is new in the V37 amiga.lib, it is safe to
  124. *    call it in all versions of the operating system.  It is also
  125. *    PURE code, thus usable in resident/pure executables.
  126. *
  127. *   NOTE
  128. *    This is a stub in amiga.lib.  It is only available via amiga.lib.
  129. *    The stub has two labels.  One, _SetRexxVar, takes the arguments
  130. *    from the stack.  The other, SetRexxVar, takes the arguments in
  131. *    registers.
  132. *
  133. *    This routine does a CheckRexxMsg() on the message.
  134. *
  135. *   EXAMPLE
  136. *
  137. *    char    *value;
  138. *
  139. *    /* Message is one from ARexx */
  140. *    if (!SetRexxVar(rxmsg,"TheVar","25 Dollars",10))
  141. *    {
  142. *        /* The value of TheVar will now be "25 Dollars" */
  143. *    }
  144. *
  145. *   INPUTS
  146. *    message        A message gotten from an ARexx script
  147. *    varname        The name of the variable to set
  148. *    value        A string that will be the new value of the variable
  149. *    length        The length of the value string
  150. *
  151. *
  152. *   RESULTS
  153. *    error        0 for success, otherwise an error code.
  154. *            (Other codes may exists, these are documented)
  155. *            3  == Insufficient Storage
  156. *            9  == String too long
  157. *            10 == invalid message
  158. *
  159. *   SEE ALSO
  160. *    SetRexxVar(), CheckRexxMsg()
  161. *
  162. *******************************************************************************
  163.